<template>
  <div class="index">

        <CommonMechine></CommonMechine>
        <MapBai></MapBai>
        <!-- <BMap></BMap> -->
        <Links></Links>
        <ScanCode></ScanCode>
  </div>
</template>

<script>
import CommonMechine from "@/components/Index/CommonMechine.vue";
import MapBai from "@/components/Index/MapBai.vue";
// import BMap from "@/components/Index/BMap.vue";
import ScanCode from "@/components/Index/ScanCode.vue";
import Links from "@/components/Index/Links.vue";
// import PopLayer from "@/components/PopLayer";
export default {
  name: "Index",
  comments: {
    MapBai
    // BMap
  },
  data() {
    return {
      array: [],
      commonPlaceBool: false, /* 常用设备显示与否 */
      commonPlace: [
        // "华侨大厦设备1",
        // "华侨大厦设备2",
        // "华侨大厦设备3",
      ]
    };
  },
  mounted() {
    // 这里是类似使用 jq的ajax
    // this.axios.post("https://www.taifa5588.com/getMainImgs").then(body => {
    //   // console.log("body data--->", body.data);
    //   this.array = body.data;
    // });

    // console.log("77777777", this.AllData);
  },
  methods: {
    // 去客服
    goKeFu() {
      // wx.navigateTo({
      //   url: "/pages/customerService/customerService",
      //   success: function(res) {},
      //   fail: function(res) {},
      //   complete: function(res) {}
      // });
    },
    // 点击常用设备
    gowhere() {
      // console.log("_name--->", e);
      // _name 当前的设备的名字是
      // let _name = e.currentTarget.dataset.d;
      // let tempJson;

      // this.data.listData.map(item => {
      //   if (_name == item.name) {
      //     tempJson = item;
      //   }
      // });
      // 缓存的设备有食物
      // if (!!tempJson) {
      //   // wx.navigateTo({
      //   //   url: "/pages/foods/foods?strdata=" + JSON.stringify(tempJson)
      //   // });
      // } else {
      //   // 缓存的设备 没有食物
      //   // wx.showToast({
      //   //   title: "no data",
      //   //   icon: "loading"
      //   // });
      // }
      
    },
    // 显示与否
    commonMechineSH() {
      console.log(this.commonPlaceBool)
      this.commonPlaceBool= !this.commonPlaceBool
    }
  },
  components: {
    MapBai,
    // BMap,
    CommonMechine,
    ScanCode,
    Links
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
/* .index {
  width: 100vw;
}
.img {
  width: 100vw;
} */



</style>
 